package edu.API基础String.String;
import java.util.Scanner;

public class 字符串替换 {
    //String replace(target,replacement):用replacement替换target
    /*
    需求：键盘录入一个字符串：如果字符串包含TMD，则使用***替换
    */
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入：");
        String s=sc.nextLine();
        //替换
        String result=s.replace("TMD","***");
        System.out.println(result);
    }
}
